package com.yyryyty.chapter12;

import java.time.LocalDateTime;

/**
 * @Description :
 * @Author : YTY
 * @Date : 2021-01-22 14:59
 */
public class DateExamples {

    public static void main(String[] args) {

//        Date releaseDate = new Date(114, 2, 18);
//        System.out.println(releaseDate);

//        LocalDate date = LocalDate.of(2014, 3, 18);
//        System.out.println(date.getYear());
//        System.out.println(date.getMonth());
//        System.out.println(date.getDayOfMonth());
//        System.out.println(date.getDayOfWeek());
//        System.out.println(date.lengthOfMonth());
//        System.out.println(date.isLeapYear());

//        System.out.println(LocalDate.now());

//        int y = date.get(ChronoField.YEAR);
//        int m = date.get(ChronoField.MONTH_OF_YEAR);
//        int d = date.get(ChronoField.DAY_OF_MONTH);

//        System.out.println(date.get(ChronoField.YEAR));
//        System.out.println(date.get(ChronoField.MONTH_OF_YEAR));
//        System.out.println(date.get(ChronoField.DAY_OF_MONTH));

//        LocalTime time = LocalTime.of(13, 45, 20);
//        System.out.println(time.getHour());
//        System.out.println(time.getMinute());
//        System.out.println(time.getSecond());

//        LocalDate date = LocalDate.parse("2014-03-18");
//        LocalTime time = LocalTime.parse("13:45:20");
//        System.out.println(date);
//        System.out.println(time);

        System.out.println(LocalDateTime.now());
    }
}
